<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button>1</button>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
    </ul>
    
    <script>
        let ul = document.querySelector('ul')
        let d = document.querySelector('button') 
        let li = document.createElement('li')
        
        d.addEventListener('click',function(){
           ul.children[0].remove()

        })
    </script>
</body>
</html>